-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add 3.12 examples from the typing preview #438
Conversation
I see that the linters are crashing on the new type variable syntax. I'll investigate whether we can update linters, or if we should do what Leodanis did for the f-strings, and provide the new syntax within comments. |
python-312/README.md
Outdated
@@ -136,6 +138,37 @@ Pythonista! | |||
|
|||
In this example, you can see how the new implementation of f-strings allows you to include backslashes in embedded expressions. This wasn't possible with f-strings in earlier versions of Python. | |||
|
|||
### Static Typing Improvements | |||
|
|||
You'll find all static typing examples inside the [`typing/`](typing/) directory. You should install the Pyright type checker for PyPI: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✍️ Typo
Should this be from instead of for? 🤔
You'll find all static typing examples inside the [`typing/`](typing/) directory. You should install the Pyright type checker for PyPI: | |
You'll find all static typing examples inside the [`typing/`](typing/) directory. You should install the Pyright type checker from PyPI: |
python-312/README.md
Outdated
- [`generic_queue.py`](typing/generic_queue.py) and [`generic_queue_311.py`](typing/generic_queue_311.py) | ||
- [`list_helpers.py`](typing/list_helpers.py) and [`list_helpers_311.py`](typing/list_helpers_311.py) | ||
- [`concatenation.py`](typing/concatenation.py) and [`concatenation_311.py`](typing/concatenation_311.py) | ||
- [`inspect_string.py`](typing/inspect_string.py) and [`inspect_string_311.py`](typing/inspect_string_311.py) | ||
- [`deck.py`](typing/deck.py) and [`deck_311.py`](typing/deck_311.py) | ||
- [`alias.py`](typing/alias.py) and [`alias_311.py`](typing/alias_311.py) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing files? I'm not seeing the *_311.py
files in this pull request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, sorry. I had updated the README to remove these links after I combined the 3.11 and 3.12, but the README wasn't committed. Should be fixed now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gahjelle LGTM!
Where to put new files:
my-awesome-article
How to merge your changes: